<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jsp/jstl/core"
	xmlns:p="http://primefaces.prime.com.tr/ui"
	xmlns:cc="http://java.sun.com/jsf/composite">

    <h:head>
	<title>This content will not be displayed</title>
    </h:head>

    <h:body>

	<cc:interface>
	    <cc:attribute name="tableId" required="true" />
	    <cc:attribute name="value" required="true" />
	    <cc:attribute name="lazy" required="true" />
	</cc:interface>

	<cc:implementation>

	    <div class="dataTable">
		<p:dataTable id="#{cc.attrs.tableId}" styleClass="dcListe"
			     value="#{cc.attrs.value}" var="tsk"
			     paginator="true" paginatorPosition="bottom" 
			     lazy="#{cc.attrs.lazy}" dynamic="#{cc.attrs.lazy}" rows="10">
		    <p:column sortBy="#{tsk.code}">
			<f:facet name="header"><h:outputText value="#{msg.tskCreationCode}"/></f:facet>
			<h:outputText value="#{tsk.code}"/>
		    </p:column>

		    <p:column sortBy="#{tsk.label}">
			<f:facet name="header"><h:outputText value="#{msg.tskCreationLibelle}"/></f:facet>
			<h:outputText value="#{tsk.label}"/>
		    </p:column>

		    <p:column sortBy="#{tsk.attachedProject.name}">
			<f:facet name="header"><h:outputText value="#{msg.tskCreationProjet}"/></f:facet>
			<h:outputText value="#{tsk.attachedProject.name}"/>
		    </p:column>

		    <p:column sortBy="#{tsk.clientRequest.clientReference}">
			<f:facet name="header"><h:outputText value="#{msg.tskCreationReferenceDC}"/></f:facet>
			<h:outputText value="#{tsk.clientRequest.clientReference}"/>
		    </p:column>

		    <p:column>
			<f:facet name="header"><h:outputText value="#{msg.tskCreationListeCollab}"/></f:facet>
			<ui:repeat value="#{tsk.assignedEmployees}" var="emp">
			    <li><h:outputText value="#{emp.firstName} #{emp.lastName}" /></li>
			</ui:repeat>
		    </p:column>

		    <ui:insert />
		</p:dataTable>
	    </div>

	</cc:implementation>

    </h:body>



</html>